<div id="list-otree" class="ui-widget-content ui-corner-all left-nav">
<h2>Database tables</h2>
	<?php
	$cnt = 0;
	if(is_array($this->adminTables) and $this->adminTables){
		ksort($this->adminTables);
		$str = '<ul>';		
		foreach($this->adminTables as $catDesc => $list){
			$class = $cnt ? 'closed' : 'open';
			$cnt ++;
			$count = count($list);
			$str .= "<li class='$class'><ins class='cat'>&nbsp;</ins>$catDesc <span class='table-count'>$count</span><ul>";
			foreach($list as $table => $label){
				$urlParam['table'] = $table;
				$urlParam['gridwidth'] = 646;
				$href = $this->url($urlParam, 'grid-index');
				$str .= "<li><ins>&nbsp;</ins><a href='$href' class='table-name'>$label</a></li>";
			}
			$str .= '</ul></li>';
		}
		$str .= '</ul>';
	}
	
	echo $str;
	$this->collateScripts('rms.initTree("#list-otree");');

	?>
</div>


<div class="clearfix">
	<div id="menu-select">
		<div id="tabs">
			<ul>
				<li><a href="#tabs-1"><?php echo $this->caption; ?></a></li>
			</ul>
		<div id="tabs-1"> 
			<?php echo $this->gridData; ?> 
		</div>
	</div>
</div> 
